/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.manage.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author yyj
* @date 2024-02-26
**/
@Entity
@Data
@Table(name="scenic")
public class Scenic implements Serializable {

    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private String id;

    @Column(name = "scenic_name")
    @ApiModelProperty(value = "景点名称")
    private String scenicName;

    @Column(name = "gisX")
    @ApiModelProperty(value = "x轴")
    private String gisx;

    @Column(name = "gisY")
    @ApiModelProperty(value = "y轴")
    private String gisy;

    @Column(name = "province")
    @ApiModelProperty(value = "省")
    private String province;

    @Column(name = "city")
    @ApiModelProperty(value = "市")
    private String city;

    @Column(name = "town")
    @ApiModelProperty(value = "县")
    private String town;

    @Column(name = "remark")
    @ApiModelProperty(value = "攻略")
    private String remark;

    @Column(name = "route")
    @ApiModelProperty(value = "路线")
    private String route;

    @Column(name = "scenic_price")
    @ApiModelProperty(value = "景区价格")
    private BigDecimal scenicPrice;

    @Column(name = "pic_path")
    @ApiModelProperty(value = "图片路径")
    private String picPath;

    @Column(name = "is_flag")
    @ApiModelProperty(value = "是否游玩")
    private String isFlag;

    public void copy(Scenic source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}